A FIFO memory is a well-known type of memory which has numerous applications in electronic circuits and systems. A FIFO memory stores elements on a stack so that the oldest elements are removed first. In many applications, one process may add elements to the stack. This process is termed the write process. Another process may remove elements from the stack. This process is termed the read process. The write process must maintain an address pointer so that it can add elements to the stack. Similarly, the read process must maintain an address pointer so that it can remove elements from the stack.
In many applications, the FIFO memory is implemented using a dual port RAM (DPRAM). One port is used by the write process and the other port is used by the read process. The write process begins by storing an element at the lowest available memory location. The write process then adds elements at sequential memory locations by incrementing a write pointer. When the write process reaches the highest available memory location, the write pointer is incremented to return to the lowest available memory location. Accordingly, the FIFO memory operates in a circular fashion.
The read process begins by removing the element from the lowest available memory location. The read process then continues to remove elements at sequential memory locations by incrementing the read pointer. When the read pointer catches up to the write pointer the memory is empty and the read process stops removing elements from the FIFO stack. When the write pointer catches up to the read pointer, the memory is full and the write process stops adding elements.
In many applications, the write process and the read process operate in different clock domains. Accordingly, circuitry must be provided to generate the write pointer in one clock domain and to generate the read pointer in the other clock domain. In addition, the circuitry must synchronize the write and read pointers across clock domains so that the write process adds elements to empty memory locations and so that the read process removes elements from valid memory locations. This synchronization can introduce significant delays between the read and write processes. In addition, the synchronization often involves complicated custom circuitry, generally not available from CMOS standard cell libraries. Development of such custom circuitry would introduce additional cost and time.